<%@ page import="entity.UserStatic" %><%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2019/3/25
  Time: 15:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%
    String name="";
    Object userName = request.getAttribute("userName");
    if (userName != null && userName!=""){//防止空指针
        name=userName.toString();
    }
%>
<form action="/loginServlet" method="post">
    <table class="tb" border="0" cellspacing="5" cellpadding="0" align="center">
        <tr><td align="center" colspan="2" style="text-align:center;" class="text_tabledetail2">用户登录</td></tr>
        <tr>
            <td class="text_tabledetail2">用户名</td>
            <td><input type="text" name="username" value="<%=name%>"/></td>
        </tr>
        <tr>
            <td class="text_tabledetail2">密码</td>
            <td><input type="password" name="password" value=""/></td>
        </tr>
        <tr>
            <td style="text-align:center;" colspan="2">
                <button type="submit" class="page-btn" name="save">登录</button>
            </td>
        </tr>
        <%
            out.print("当前观看直播人数:"+ UserStatic.user);
        %>
    </table>
</form>
</body>
</html>
